LearningStore Constructor (string, string, bool)

Initializes a new instance of the LearningStore class.

Parent Type: LearningStore

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public LearningStore (
string connectionString,
string userKey,
bool disableSecurityChecks

)

Parameters

connectionString

The connection used to access the SQL server database. The string is the same format as a connection string passed to System.Data.SqlClient.SqlConnection

userKey

The unique key of the user accessing the database.

disableSecurityChecks

True if security checks should be skipped when performing operations in the database.

Exceptions
Exception type Condition
ArgumentNullException

connectionString or userKey is a null reference.

Example

The following code opens the store located in the "Mls" database of the "Learning" server with the user key "Bob":

C#
LearningStore store = new LearningStore("Server=Learning;Database=Mls;Integrated Security=true", "Bob", false);